#include <iostream>


//
// Clases
//

class cTest {
	
public:
	// Atributo Publico,sino no podre apuntarlo
	double m_num;
	cTest(const double& num=0) : m_num(num) {}
	~cTest() {}
	void print(void) const {std::cout << "El double es " << m_num << std::endl;}
};


//
// Main
// 

int main(void) {
	
	cTest test(7);
	
	// Puntero a la variable privada
	double (cTest::*data_member) = &cTest::m_num;
	
	// Puntero a member function
	void (cTest::*function) (void) const = &cTest::print;

	(test.*function)();

	test.*data_member = 10;

	(test.*function)();

	return 0;
}
